<?php

use yii\helpers\Html;
use kartik\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\modules\car_order\models\CarOrderSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('app', 'Car Orders');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="car-order-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?php // echo Html::a(Yii::t('app', 'Create Car Order'), ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            'id',
            [
                'class' => \common\components\grid\KEnumColumn::className(),
                'label' => '类型',
                'attribute' => 'car_type',
                'enum' => \common\models\CarOrder::getType(),
            ],
            'custom_id',
            'custom.master_name',
            'custom.orderno',
            'status',
            'cust_name',
            'id_type',
            'id_no',
            ['class' => \kartik\grid\ActionColumn::className()],
            'serialize_data:ntext',
        ],
    ]); ?>
</div>
